import { handleActions } from "redux-actions"

const initState = {
  posts: []
}

export default handleActions(
  {
    "post-store/update-state": (state, action) => ({ ...state, ...action.state }),
    "post-store/update-posts": (state, action) => ({ ...state, posts: action.data })
  },
  initState
)
